#! /usr/bin/perl
use strict;
use warnings;
use feature 'state';
state $avgCach = 0;
state $count = 0;
sub averageC {
	chomp (my $cache = `~/Dropbox/perlBog/./test1.pl`);
	$count++;
	$avgCach = ($avgCach + $cache)/$count;
	print "Cache = $cache\nAvg Cache = $avgCach\n";
}

my $xxx = &averageC;
print $xxx;
